<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html style="height: 100%;"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <title>登录-会员收银管理系统软件</title>
    <meta name="keywords" content="登录-萱萱家会员收银管理系统软件">
    <meta name="description" content="登录-萱萱家会员收银管理系统软件">
    <link rel="stylesheet" href="/Public/Home/login/css/layui.css">
    <link rel="stylesheet" href="/Public/Home/login/css/regiest.css">
    <script type="text/javascript" src="/Public/Home/login/js/template.js"></script>
    <link href="/Public/Home/login/css/jquery.slideBox.css" rel="stylesheet" type="text/css">
    <script>
        if(window.top!==window.self){window.top.location=window.location};
    </script>
<link id="layuicss-skinlayercss" rel="stylesheet" href="/Public/Home/login/css/layer.css" media="all"><link id="layuicss-laydatecss" rel="stylesheet" href="/Public/Home/login/css/laydate.css" media="all"></head>
<body style="height: 100%;">
<div class="fc-login-panel">
    <div class="logobf">
        <span class="logo-tip" style="font-size: 40px;">会员收银系统</span>
        <span class="logo-tip" style="font-size: 20px;">萱萱家</span>
        <!--<img src="/Public/images/yklogo.png" style="width: 5%;">-->
    </div>
    <div class="fc-logon-main">
        <div class="lunbodw">
            <div id="demo1" class="slideBox" style="width: 320px; height: 414px;">
                <ul class="items" style="width: 960px; left: -640px;">
                    <li class="" style="width: 320px; height: 414px;"><a href="##" title=""><img src="/Public/Home/login/images/banner1.png"></a></li>
                    <li style="width: 320px; height: 414px;" class="active"><a href="##" title=""><img src="/Public/Home/login/images/banner2.png"></a></li>
                    <li style="width: 320px; height: 414px;" class=""><a href="##" title=""><img src="/Public/Home/login/images/banner3.png"></a></li>

                </ul>
            <div class="tips" style="opacity: 1;"><div class="title"><a href="##"></a></div><div class="nums" style=""><a href="##" class="" style="border-radius: 10px;"></a><a href="##" style="border-radius: 10px;" class=""></a><a href="##" style="border-radius: 10px;" class="active"></a></div></div></div>
            <div class="login-footer">
                <div class="footer-icon">
                    <ul style="margin-left: 30px;">
                        <!--<li>-->
                        <!--<a href="javascript:;"-->
                        <!--href="http://wpa.qq.com/msgrd?v=3&amp;uin=1140041853&amp;site=qq&amp;menu=yes"-->
                        <!--data_c="ShowInfo" data_s="EWM1"><i class="footer-icons footer-icon1 "></i></a>-->

                        <!--<div class=" popover" id="EWM1">-->
                        <!--<div class="arrow arrow0"></div>-->
                        <!--QQ客服-->
                        <!--</div>-->
                        <!--</li>-->
                        <li>
                            <a href="javascript:;" data_c="ShowInfo" data_s="EWM2"><i class="footer-icons footer-icon2 "></i></a>

                            <div class=" popover popover1" id="EWM2" style="left: 28px;top: -162px;">
                                <div class="arrow arrow1"></div>
                                <img src="#" class="erwei">
                            </div>
                        </li>
                        <!--<li>-->
                        <!--<a href="http://www.hfwjx.com" target="_blank" data_c="ShowInfo" data_s="EWM3"><i-->
                        <!--class="footer-icons footer-icon3 "></i></a>-->

                        <!--<div class=" popover popover2" id="EWM3">-->
                        <!--<div class="arrow arrow2"></div>-->
                        <!--返回官网-->
                        <!--</div>-->
                        <!--</li>-->
                        <li>
                            <a href="javascript:;" data_c="ShowInfo" data_s="EWM4"><i class="footer-icons footer-icon4 "></i></a>

                            <div class=" popover popover3" id="EWM4" style="left: 90px;top: -162px;">
                                <div class="arrow arrow3"></div>
                                <img src="#" class="erwei">

                            </div>
                        </li>
                        <li>
                            <a href="#" data_c="ShowInfo" data_s="EWM5"><i class="footer-icons footer-icon5 "></i></a>

                            <div class=" popover popover4" id="EWM5" style="left: 173px;">
                                <div class="arrow arrow4"></div>
                                电脑端下载
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="login-bg">
        <form class="layui-form z-login-form" action="" method="POST">
            <div class="login-form">
                <div class="login-title">用户登录</div>
                <ul>
                    <li>
                        <div class="icon-bg">
                            <i class="iocn-login iocn-login1"></i>
                        </div>
                        <div class="denglu_border">
                            <input type="text" name="username" placeholder="登录账号" class="input-style">
                        </div>
                    </li>
                    <li>
                        <div class="icon-bg">
                            <i class="iocn-login iocn-login2"></i>
                        </div>
                        <div class="denglu_border">
                            <input type="password" name="password" placeholder="登录密码" class="input-style" autocomplete="new-password"></div>
                    </li>
                    <li style="border: none;">
                        <div class="icon-bg">
                            <i class="iocn-login iocn-login3"></i>
                        </div>

                        <!--<div id="captcha" class="huadong">-->
                            <!--<p id="wait" class="show denglu-jiazai">正在加载验证码......</p>-->
                        <!--</div>-->
                        <div class="denglu_border width-200" style="">
                           <input type="text" name="" placeholder="欢迎使用" class="input-style" maxlength="4">                     
                        </div>

                    </li>
                </ul>                
            </div>
            <div class=" login-btn">
                <a href="javascript:;" lay-submit="" lay-filter="SubmitLogin" id="SubmitLogin">登&nbsp;&nbsp;录</a>
                <input type="submit" style="display: none;" lay-submit="" lay-filter="SubmitLogin" value="登录">
            </div>
        </form>
            <div class="fuwuxieyi text-center">
                还没有账号，<a href="#"><span class="color-orange">立即注册</span></a>
            </div>

        </div>
    </div>
</div>
<style>
    #embed-captcha {
        width: 300px;
        margin: 0 auto;
    }

    .show {
        display: block;
    }

    .hide {
        display: none;
    }

    #notice {
        color: red;
    }
</style>
<div class="banner">
    <div class="flexslider">
        <ul class="slides">
            <li class="flex-active-slide" style="width: 100%; float: left; margin-right: -100%; position: relative; opacity: 1; display: block; z-index: 2;">
                <div style="background-image:url(/Public/Home/login/images/index_bg1.jpg);background-repeat: no-repeat; background-position:center;background-size:cover;height:100%;"></div>
            </li>
        </ul>
    <ol class="flex-control-nav flex-control-paging"></ol><ul class="flex-direction-nav"><li><a class="flex-prev flex-disabled" href="##" tabindex="-1"></a></li><li><a class="flex-next flex-disabled" href="##" tabindex="-1"></a></li></ul></div>
</div>
<script type="text/javascript" src="/Public/Home/login/js/config.js"></script>
<script src="/Public/Home/login/js/jquery-1.10.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/Public/Home/login/js/gt.js"></script>
<script src="/Public/Home/login/js/jquery.cookie.js" type="text/javascript"></script>
<script src="/Public/Home/login/js/layui.js" type="text/javascript"></script>
<script src="/Public/Home/login/js/jquery.fullPage.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="/Public/Home/login/js/layui-function.js"></script>
<script type="text/javascript" src="/Public/Home/login/js/jquery.flexslider-min.js"></script>
<script src="/Public/Home/login/js/jquery.slideBox.js" type="text/javascript"></script>
<script type="text/javascript">
    jQuery(function ($) {
        $('#demo1').slideBox({
            duration: 0.3,//滚动持续时间，单位：秒
            easing: 'linear',//swing,linear//滚动特效
            delay: 5,//滚动延迟时间，单位：秒
            hideClickBar: false,//不自动隐藏点选按键
            clickBarRadius: 10
        });
    });
</script>

<script type="text/javascript">
    $(document).ready(function () {
        $('.flexslider').flexslider({
            directionNav: true,
            pauseOnAction: false,
            slideshowSpeed: 5000
        });
    });
    $('[data_c="ShowInfo"]').hover(function () {
        var data_s = $(this).attr('data_s');
        $('#' + data_s).show();
    }, function () {
        var data_s = $(this).attr('data_s');
        $('#' + data_s).hide();
    });
</script>
<script id="SMSVerifyCode_c" type="text/html">
    <div class="layer-tanchunr " style="width: 450px;">
        <form class="layui-form z-login-form" action="">
            <input type="hidden" name="SafeLoginToken" value="<%=SafeInfo.safe_token%>">
            <input type="hidden" name="UserName" value="<%=SafeInfo.user_name%>">

            <div class="login-form">
                <ul>
                    <li>
                        <div class="icon-bg">
                            <i class="iocn-login iocn-login4"></i>
                        </div>
                        <div class="denglu_border">
                        <input type="hidden" name="phone" class="input-style" value="<%=SafeInfo.employee_tel%>">
                        <span class="huoqu-miao"><%=SafeInfo.employee_tel%></span>
                            </div>
                    </li>
                    <li>
                        <div class="icon-bg">
                            <i class="iocn-login iocn-login3"></i>
                        </div>
                        <div class="denglu_border">
                            <input type="text" name="PhoneVerifyCode" placeholder="短信验证码" class="input-style">

                            <div class="pull-right huoqu-yzm" data_c="addcustomer">
                                <a href="javascript:;" >获取验证码</a>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="login-btn">
                <a href="javascript:;" lay-submit lay-filter="safeLogin">确认进入系统</a>
                <input type="submit" style="display: none;" lay-submit lay-filter="safeLogin" value="确认进入系统">
            </div>
        </form>
    </div>
</script>
<style>
    .margin-left-200{
        margin-left: 200px;
    }
</style>
<script type="text/javascript">

    var CodeImg = "/index.php/Login/CreateCode.html";
    var IndexView = "/index.php/Index/index.html";
    //    var SafeIndexView="/index.php/Login/SafeView.html";
    var getSMSCodeUrl = "/api.php/login/getSafeLoginCode.html";
    var LoginUrl = "/api.php/Login/NewCodeLogin.html";
    var safeLoginUrl = "/api.php/Login/SafeLogin.html";
    var SMSVerifyCodeLayer = '';
    var RememberMe = $.cookie('RememberMe');
    var getGeetestInfoUrl = "/api.php/Login/getGeetestInfo.html?t=" + (new Date()).getTime();
    if (RememberMe == 1) {
        $('[name="UserName"]').val($.cookie('UserName'));
        $('[name="Password"]').val($.cookie('Password'));
        $('[name="RememberMe"]').prop('checked', true);
    }
    $(function () {
        layui.use(init_layui, function () {
            var circle_data = [];
            $('.quality_cont').fullpage({
                scrollOverflow: true,
                verticalCentered: true,
                css3: true,
                navigation: true,
                navigationPosition: 'left',
                navigationColor: '#fff',
                navigationTooltips: circle_data
            });
            var layer = layui.layer;
            var layui_form = layui.form();
            //登录提交
            layui_form.on('submit(SubmitLogin)', function(layui_data){
                $.ajaxUrl({
                    layer:layer,
                    url:LoginUrl,
                    data:layui_data.field,
                    async:false,
                    is_load:false,
                    isallresult:true,
                    datafun:function(result){
                        if (result.code != 1) {
                            layer.msg(result.message, {
                                shadeClose: true,
                                shade: 0.8,
                                btnAlign: 'c',
                                icon: 2,
                                time:0,
                                btn: ['确定'],
                                yes:function(index){
                                    layer.close(index);
                                }
                            });
//                            captchaObj.reset();
                            $('[name=VerifyCode]').val('');
                            getCode();
                            return false;
                        }
                        var data = result.data;
                        $.cookie('RememberMe', data.RememberMe ? 1 : 0, {expires: 360, path: '/'});  //多页面COOKIE
                        if (data.RememberMe) {
                            $.cookie('UserName', layui_data.field.UserName, {expires: 360, path: '/'}); //多页面COOKIE
                            $.cookie('Password', layui_data.field.Password, {expires: 360, path: '/'});  //多页面COOKIE
                        } else {
                            $.cookie('UserName', null);
                            $.cookie('Password', null);
                        }

                        if (data.is_safe_login == 1) {
//                            location.href = SafeIndexView;
                            showSafePhone(data);
                        } else {
                            $.cookie(LoginTokenName, data.Token, {path: '/'}); //多页面COOKIE
                            location.href = IndexView;
                        }
                    }
                });
                return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
            });

            function showSafePhone(SafeInfo) {
                var html = template.render('SMSVerifyCode_c', {SafeInfo: SafeInfo});
                SMSVerifyCodeLayer = $.layer_type_1({
                    layer: layer,
                    title: false,
                    content: html,
                    area:["600px","250px"],
                    offset:"30%"
                });
                $('[data_c="addcustomer"]').click(function () {
                    var addcustomer = $(this);
                    $.ajaxUrl({
                        layer: layer,
                        url: getSMSCodeUrl,
                        data: {employee_tel: SafeInfo.employee_tel, UserName: SafeInfo.user_name},
                        async: false,
                        is_load: false,
                        datafun: function (data) {
                            $('#phone').val(data.phone);
//                            layer.close(SMSVerifyCodeLayer);
                            //让获取验证码开始计时
                            addcustomer.hide();
                            var setDaojishisec = 60;
                            //生成倒计时文字
                            addcustomer.parent().append('<div class="denglu-jiazai huadong margin-left-200" data_c="autoCreateJishi">' + setDaojishisec + '秒后重获</div>');
                            var autoCreateJishi = setInterval(function () {
                                setDaojishisec--;
                                if (setDaojishisec > 0) {
                                    addcustomer.parent().find('[data_c="autoCreateJishi"]').text(setDaojishisec + '秒后重获');
                                } else {
                                    clearInterval(autoCreateJishi);
                                    addcustomer.parent().find('[data_c="autoCreateJishi"]').remove();
                                    addcustomer.show();
                                }
                            }, 1000)
                        }
                    });
                })
            }

            layui_form.on('submit(safeLogin)', function (layui_data) {
                $.ajaxUrl({
                    layer: layer,
                    url: safeLoginUrl,
                    data: layui_data.field,
                    async: false,
                    is_load: false,
                    isallresult: true,
                    datafun: function (result) {
                        if (result.code != 1) {
                            layer.msg(result.message, {icon: 2});
                            return false;
                        }
                        var data = result.data;
                        layer.close(SMSVerifyCodeLayer);
                        $.cookie(LoginTokenName, data.Token, {path: '/'}); //多页面COOKIE
                        location.href = IndexView;
                    }
                });
                return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
            })
            //点击更换验证码
            $('#yzm').click(function () {
                getCode();
            });
            function getCode() {
                var NewCodeImg = CodeImg + "?cache=" + Math.random();
                $('#yzm').attr('src', NewCodeImg);
            }

//            var handler = function (captchaObj) {
//                captchaObj.appendTo('#captcha');
//                captchaObj.onReady(function () {
//                    $("#wait").hide();
//                });
//
//                $('#SubmitLogin').click(function () {
//                    if(!$('[name=UserName]').val()){
//                        layer.msg('登录账号',{icon:2});
//                        return false;
//                    }
//                    if(!$('[name=Password]').val()){
//                        layer.msg('登录密码',{icon:2});
//                        return false;
//                    }
//                    var result = captchaObj.getValidate();
//                    if (!result) {
//                        layer.msg('请完成验证', {icon: 2});
//                        return false;
//                    }
//                    //登录提交
//                    layui_form.on('submit(SubmitLogin)', function (layui_data) {
//                        layui_data.field.geetest_challenge = result.geetest_challenge;
//                        layui_data.field.geetest_validate = result.geetest_validate;
//                        layui_data.field.geetest_seccode = result.geetest_seccode;
//                        $.ajaxUrl({
//                            layer: layer,
//                            url: LoginUrl,
//                            data: layui_data.field,
//                            async: false,
//                            is_load: false,
//                            isallresult: true,
//                            datafun: function (result) {
//                                if (result.code == 0) {
//                                    layer.msg(result.message, {icon: 2});
//                                    captchaObj.reset();
//                                    return false;
//                                }
//                                var data = result.data;
//                                $.cookie('RememberMe', data.RememberMe ? 1 : 0, {expires: 360, path: '/'});  //多页面COOKIE
//                                if (data.RememberMe) {
//                                    $.cookie('UserName', layui_data.field.UserName, {expires: 360, path: '/'}); //多页面COOKIE
//                                    $.cookie('Password', layui_data.field.Password, {expires: 360, path: '/'});  //多页面COOKIE
//                                } else {
//                                    $.cookie('UserName', null);
//                                    $.cookie('Password', null);
//                                }
//
//                                if (data.is_safe_login == 1) {
////                            location.href = SafeIndexView;
//                                    showSafePhone(data);
//                                } else {
//                                    $.cookie(LoginTokenName, data.Token, {path: '/'}); //多页面COOKIE
//                                    location.href = IndexView;
//                                }
//                            }
//                        });
//                        return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
//                    });
//                })
//                // 更多接口说明请参见：http://docs.geetest.com/install/client/web-front/
//                window.gt = captchaObj;
//            };
            //滑动验证
//            Initgeetest();
            function Initgeetest() {
                $.ajaxUrl({
                    layer: layer,
                    url: getGeetestInfoUrl,
                    data: {},
                    async: false,
                    is_load: false,
                    isallresult: true,
                    datafun: function (getData) {
                        initGeetest({
                            width: '100%',
                            gt: getData.gt,
                            challenge: getData.challenge,
                            new_captcha: getData.new_captcha,
                            product: "embed", // 产品形式，包括：float，embed，popup。注意只对PC版验证码有效
                            offline: !getData.success // 表示用户后台检测极验服务器是否宕机，一般不需要关注
                            // 更多配置参数请参见：http://www.geetest.com/install/sections/idx-client-sdk.html#config
                        }, handler);
                    }
                });

            }

        })

    });
</script>


<div><object id="ClCache" click="sendMsg" host="" width="0" height="0"></object></div></body></html>